-
Notifications
You must be signed in to change notification settings - Fork 3.4k
Add custom_instructions parameter to assign_copilot_to_issue tool #1806
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add custom_instructions parameter to assign_copilot_to_issue tool #1806
Conversation
- Added optional custom_instructions parameter to tool schema - Updated implementation to pass custom instructions to agent assignment - Added test case to verify custom_instructions works correctly - Updated toolsnaps and documentation The custom_instructions parameter allows users to provide additional context, constraints, or guidance to the Copilot agent beyond what's in the issue body, addressing the issue where additional context would otherwise be lost. Co-authored-by: SamMorrowDrums <4811358+SamMorrowDrums@users.noreply.github.com>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull request overview
This PR adds an optional custom_instructions parameter to the assign_copilot_to_issue tool, enabling users to provide additional context and guidance to the Copilot agent beyond what's captured in the issue body. The change is backward compatible and follows existing patterns for optional parameters.
Changes:
- Added
custom_instructionsoptional string parameter to tool schema and implementation - Added comprehensive test coverage including new test case with custom instructions
- Updated toolsnaps and auto-generated documentation
Reviewed changes
Copilot reviewed 4 out of 4 changed files in this pull request and generated no comments.
| File | Description |
|---|---|
| pkg/github/issues.go | Added custom_instructions parameter to tool schema, params struct, and conditional logic to include it in agent assignment when provided |
| pkg/github/issues_test.go | Added verification that custom_instructions property exists in schema and new test case validating the parameter is correctly passed through GraphQL mutation |
| pkg/github/toolsnaps/assign_copilot_to_issue.snap | Updated tool snapshot with new custom_instructions property definition |
| README.md | Auto-generated documentation updated to include the new parameter |
Summary
Adds optional
custom_instructionsparameter toassign_copilot_to_issuetool, enabling users to provide additional context beyond the issue body when assigning Copilot agents.Why
When assigning Copilot to issues, additional context like coding standards, architectural constraints, or testing requirements cannot be captured in the issue body. This parameter preserves that context by passing it directly to the agent.
What changed
custom_instructionsstring parameter (optional) to tool schemaAgentAssignmentInputto conditionally include custom instructionsMCP impact
Prompts tested (tool changes only)
Security / limits
Tool renaming
Lint & tests
./script/lint./script/testDocs
./script/generate-docsExample usage
{ "name": "assign_copilot_to_issue", "arguments": { "owner": "github", "repo": "my-repo", "issue_number": 123, "custom_instructions": "Follow PEP 8. Use pytest. Maintain Python 3.8+ compatibility." } }Original prompt
💬 We'd love your input! Share your thoughts on Copilot coding agent in our 2 minute survey.